package my.app;

import android.app.TabActivity;
import android.content.Context;
import android.content.Intent;
import android.location.Criteria;
import android.location.LocationManager;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.TabHost;
import android.widget.Toast;
import android.widget.TabHost.TabSpec;

public class Bitirme extends TabActivity  {
 TabHost mTabHost;
 FrameLayout mFrameLayout;

 /** Called when the activity is first created.*/
 @Override
 public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    
    
    mTabHost = getTabHost();
    
    //Adding Map Tab. 
    TabSpec tabSpec = mTabHost.newTabSpec("map_tab");
    tabSpec.setIndicator("Map", getResources().getDrawable(R.drawable.maptab));
    Context ctx = this.getApplicationContext();
    Intent i = new Intent(ctx, MapTabView.class);
    tabSpec.setContent(i);
    mTabHost.addTab(tabSpec);
    
    //Adding Taxi Tab
    TabSpec tabSpec2 = mTabHost.newTabSpec("taxi_tab");
    tabSpec2.setIndicator("Cabs", getResources().getDrawable(R.drawable.taxilistpn));
    Intent i2 = new Intent(ctx, TaxiTabView.class);
    tabSpec2.setContent(i2);
    mTabHost.addTab(tabSpec2);
    
    //Adding Companies Tab
    TabSpec tabSpec3 = mTabHost.newTabSpec("comp_tab");
    tabSpec3.setIndicator("Companies", getResources().getDrawable(R.drawable.complist));
    Intent i3 = new Intent(ctx, CompanyTabView.class);
    tabSpec3.setContent(i3);
    mTabHost.addTab(tabSpec3);
    
    //Adding Favorites Tab
    TabSpec tabSpec4 = mTabHost.newTabSpec("fav_tab");
    tabSpec4.setIndicator("Favorites", getResources().getDrawable(R.drawable.favlist));
    Intent i4 = new Intent(ctx, FavTabView.class);
    i4.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    tabSpec4.setContent(i4);
    mTabHost.addTab(tabSpec4);



    
    //mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator("Companies").setContent(R.id.textview2));
    //mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator("Favorites").setContent(R.id.textview2));

    mTabHost.setCurrentTab(0);
    
    
 }
}
